/*
 * Project.java
 *
 * Project: TECHWATCH - TESTING TECHNOLOGIES
 *
 * Copyright 2008 by ELCA Informatique SA
 * Av. de la Harpe 22-24, 1000 Lausanne 13
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of ELCA Informatique SA. ("Confidential Information"). You
 * shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license
 * agreement you entered into with ELCA.
 */

package ch.elca.training.dom;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ELCA's project. A project has project number, project name, customer, status, start date and end date.
 *
 * <script type="text/javascript">printFileStatus
 *   ("$URL: https://cvs.elca.ch/subversion/cxnet-portal/trunk/etc/eclipse/preferences_2008_03_03.epf $",
 *    "$Revision: 334 $",
 *    "$Date: 2008-03-03 16:07:32 +0700 (Mon, 03 Mar 2008) $",
 *    "$Author: qkp@ELCA.CH $"
 *    "$Id:$"
 * );</script>
 *
 * @author ltd
 */
@Entity
@Table(name = Project.TABLE)
@org.hibernate.annotations.Table(appliesTo = Project.TABLE)
@SuppressWarnings(value = { "serial" })
public class Project extends BaseDom {
    /**
     * Table name.
     */
    public static final String TABLE = "PROJECT";

    /**
     * Project number.
     */
    public static final String COLUMN_NUMBER = "ProjectNumber";
    @Column(name = COLUMN_NUMBER, nullable = false, unique = true)
    private int m_number;
    
    /**
     * Project name.
     */
    public static final String COLUMN_NAME = "ProjectName";
    public static final int LENGTH_NAME = 100;
    @Column(name = COLUMN_NAME, nullable = false, length = LENGTH_NAME)
    private String m_name;
    
    /**
     * Customer.
     */
    public static final String COLUMN_CUSTOMER = "Customer";
    public static final int LENGTH_CUSTOMER = 500;
    @Column(name = COLUMN_CUSTOMER, nullable = false, length = LENGTH_CUSTOMER)
    private String m_customer;
    
    /**
     * Status.
     */
    public static final String COLUMN_STATUS = "Status";
    public static final int LENGTH_STATUS = 3;
    @Column(name = COLUMN_STATUS, nullable = false, length = LENGTH_STATUS)
    @Enumerated
    private Status m_status;
    
    /**
     * Start date.
     */
    public static final String COLUMN_START = "StartDate";
    @Column(name = COLUMN_START, nullable = false)
    @Temporal(TemporalType.DATE)
    private Date m_startDate;
    
    /**
     * End date.
     */
    public static final String COLUMN_END = "EndDate";
    @Column(name = COLUMN_END)
    @Temporal(TemporalType.DATE)
    private Date m_endDate;
    
	/**
	 * @param number the project number to set
	 */
	public void setProjectNumber(int number) {
		this.m_number = number;
	}
	/**
	 * @return the project number
	 */
	public int getProjectNumber() {
		return m_number;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.m_name = name;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return m_name;
	}
	/**
	 * @param customer the customer to set
	 */
	public void setCustomer(String customer) {
		this.m_customer = customer;
	}
	/**
	 * @return the customer
	 */
	public String getCustomer() {
		return m_customer;
	}
	/**
	 * @param startDate the start date to set
	 */
	public void setStartDate(Date startDate) {
		this.m_startDate = startDate;
	}
	/**
	 * @return the start date
	 */
	public Date getStartDate() {
		return m_startDate;
	}
	/**
	 * @param endDate the end date to set
	 */
	public void setEndDate(Date endDate) {
		this.m_endDate = endDate;
	}
	/**
	 * @return the end date
	 */
	public Date getEndDate() {
		return m_endDate;
	}
	/**
	 * @param status the status to set
	 */
	public void setStatus(Status status) {
		this.m_status = status;
	}
	/**
	 * @return the status
	 */
	public Status getStatus() {
		return m_status;
	}
}